package com.xydtech.workflow.service.impl;

import com.xydtech.common.core.text.Convert;
import com.xydtech.workflow.domain.WflStepDoc;
import com.xydtech.workflow.mapper.WflStepDocMapper;
import com.xydtech.workflow.service.IWflStepDocService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 流程节点影像资料配置Service业务层处理
 *
 * @author JHON
 * @date 2022-01-04
 */
@Service
public class WflStepDocServiceImpl implements IWflStepDocService {
    @Autowired
    private WflStepDocMapper wflStepDocMapper;

    /**
     * 查询流程节点影像资料配置
     *
     * @param docId 流程节点影像资料配置主键
     * @return 流程节点影像资料配置
     */
    @Override
    public WflStepDoc selectWflStepDocByDocId(Long docId) {
        return wflStepDocMapper.selectWflStepDocByDocId(docId);
    }

    /**
     * 查询流程节点影像资料配置列表
     *
     * @param wflStepDoc 流程节点影像资料配置
     * @return 流程节点影像资料配置
     */
    @Override
    public List<WflStepDoc> selectWflStepDocList(WflStepDoc wflStepDoc) {
        return wflStepDocMapper.selectWflStepDocList(wflStepDoc);
    }

    /**
     * 新增流程节点影像资料配置
     *
     * @param wflStepDocList 流程节点影像资料配置
     * @return 结果
     */
    @Override
    public int insertWflStepDoc(List<WflStepDoc> wflStepDocList) {
        return wflStepDocMapper.insertWflStepDoc(wflStepDocList);
    }

    /**
     * 修改流程节点影像资料配置
     *
     * @param wflStepDoc 流程节点影像资料配置
     * @return 结果
     */
    @Override
    public int updateWflStepDoc(WflStepDoc wflStepDoc) {
        return wflStepDocMapper.updateWflStepDoc(wflStepDoc);
    }

    /**
     * 批量删除流程节点影像资料配置
     *
     * @param docIds 需要删除的流程节点影像资料配置主键
     * @return 结果
     */
    @Override
    public int deleteWflStepDocByDocIds(String docIds) {
        return wflStepDocMapper.deleteWflStepDocByDocIds(Convert.toStrArray(docIds));
    }

    /**
     * 删除流程节点影像资料配置信息
     *
     * @param docId 流程节点影像资料配置主键
     * @return 结果
     */
    @Override
    public int deleteWflStepDocByDocId(Long docId) {
        return wflStepDocMapper.deleteWflStepDocByDocId(docId);
    }

    /**
     * 删除流程节点影像资料配置信息
     *
     * @param wflStepDoc 流程节点影像资料配置主键
     * @return 结果
     */
    @Override
    public int deleteWflStepDoc(WflStepDoc wflStepDoc) {
        return wflStepDocMapper.deleteWflStepDoc(wflStepDoc);
    }
}
